home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 09 - 1993 / 09.02 Feb 93 / Screen I⁄O Classes / B Classes / B.c / BBitMapPane.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-12  |  1.4 KB  |  52 lines  |  [TEXT/KAHL]

  1. /*********************************************************
  2.  * BBitMapPane.c
  3.  *
  4.  * SUPERCLASS = CBitMapPane
  5.  *
  6.  * Pane class for BBitMapDoc class.
  7.  *
  8.  * © copyright 1992, KSS Scientific Consultants
  9.  *
  10.  ********************************************************/
  11.  
  12. #include "BBitMapPane.h"
  13.  
  14. /********************************************************
  15.  * IBBitMapPane()
  16.  *
  17.  * Initialization method.
  18.  *
  19.  *******************************************************/
  20.  
  21. void BBitMapPane::IBBitMapPane(CView *anEnclosure, CBureaucrat *aSupervisor,
  22.                             short aWidth, short aHeight,
  23.                             short aHEncl, short aVEncl,
  24.                             SizingOption aHSizing, SizingOption aVSizing,
  25.                             LongRect *aBounds, CBitMap *aBitMap, Boolean makePort)
  26. {
  27.     inherited::IBitMapPane(anEnclosure, aSupervisor, aWidth, aHeight, aHEncl, 
  28.                             aVEncl, aHSizing, aVSizing, aBounds, aBitMap, makePort);
  29. }
  30.  
  31. /*********************************************************
  32.  * InstallBitMap()
  33.  *
  34.  * Install the bitmap in itsBitMap.
  35.  *
  36.  *********************************************************/
  37.  
  38. void BBitMapPane::InstallBitMap(BitMap *theBitMap)
  39. {
  40.     LongRect    theLongRect;
  41.     
  42.     theLongRect.top = theBitMap->bounds.top;
  43.     theLongRect.left = theBitMap->bounds.left;
  44.     theLongRect.bottom = theBitMap->bounds.bottom;
  45.     theLongRect.right = theBitMap->bounds.right;
  46.  
  47.     CopyBits(theBitMap, itsBitMap->macBitMap, &theBitMap->bounds, &theBitMap->bounds,
  48.             srcCopy, 0L);
  49.     Prepare();
  50.     itsBitMap->CopyFrom(&theLongRect, &theLongRect, 0L);
  51. }
  52.